package com.jymj.entity.zjd;

import com.jymj.common.validator.group.AddGroup;
import com.jymj.enumEntity.zjd.ApplyChildEnum;
import org.hibernate.validator.constraints.NotBlank;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * Created by ljj on 2018/8/30.
 */
public class ApplyChildEntity implements Serializable {
    private Integer id;
    //'申请项目外键'
    private Integer appid;
    //'施工状态'
    @NotBlank(message="施工状态不能为空", groups = {AddGroup.class})
    private Integer sgtype;
    private String sgtypeText;
    //'施工方联系方式'
    private String sgphone;
    //'施工计划进场时间'
    private Date sgjhjcsj;
    //'施工进场时间'
    private Date sgjcsj;
    //'计划完成时间'
    private Date jhwcsj;
    //'施工完成时间'
    private Date sgwcdate;
    private String remark;
    //'确认施工时间'
    private Date qrsgdate;

    List<ApplyChildFileEty> applyChildFileEtyList;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getAppid() {
        return appid;
    }

    public void setAppid(Integer appid) {
        this.appid = appid;
    }

    public Integer getSgtype() {
        return sgtype;
    }

    public void setSgtype(Integer sgtype) {
        this.sgtype = sgtype;
    }

    public String getSgphone() {
        return sgphone;
    }

    public void setSgphone(String sgphone) {
        this.sgphone = sgphone;
    }

    public Date getSgjhjcsj() {
        return sgjhjcsj;
    }

    public void setSgjhjcsj(Date sgjhjcsj) {
        this.sgjhjcsj = sgjhjcsj;
    }

    public Date getSgjcsj() {
        return sgjcsj;
    }

    public void setSgjcsj(Date sgjcsj) {
        this.sgjcsj = sgjcsj;
    }

    public Date getJhwcsj() {
        return jhwcsj;
    }

    public void setJhwcsj(Date jhwcsj) {
        this.jhwcsj = jhwcsj;
    }

    public Date getSgwcdate() {
        return sgwcdate;
    }

    public void setSgwcdate(Date sgwcdate) {
        this.sgwcdate = sgwcdate;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Date getQrsgdate() {
        return qrsgdate;
    }

    public void setQrsgdate(Date qrsgdate) {
        this.qrsgdate = qrsgdate;
    }

    public List<ApplyChildFileEty> getApplyChildFileEtyList() {
        return applyChildFileEtyList;
    }

    public void setApplyChildFileEtyList(List<ApplyChildFileEty> applyChildFileEtyList) {
        this.applyChildFileEtyList = applyChildFileEtyList;
    }

    private String getSgtypeText(){
        if(getSgtype() !=null){
            return ApplyChildEnum.getName(getSgtype());
        }
        return null;
    }
}
